{% extends 'base.html' %}

{% block content %}
<h1>.</h1>
<div class="container">
  <div class="row"> </div>
    <div align="center" class="row mt-4 mb-3">
      <h1>Редактирование профиля</h1>
    </div>
</div>
{% if messages %}
        {% for message in messages %}
            <div class="alert {{message.tags}} alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
        {% endfor %}
{% endif %}
<form action="{% url 'profile_edit' %}" method="POST">
  {% csrf_token %}
  <div class="container">
    <div class="row">
    Текущее {{form.name.label}} - {{user.username}}, введите новое:
  </div>
   <div class="row mt">
      {{form.name}}
  </div>
   <div class="row mt-2">
      Текущий {{form.email.label}} - {{user.email}}, введите новый
  </div>
   <div class="row">
      {{form.email}}
  </div>
      <button type="reset" class="btn btn-primary mt-3">Очистить</button>
      <button type="submit" class="btn btn-primary mt-3">Сохранить</button>
  </div>
</form>
{% endblock %}